class A {
    A(int num) {
        System.out.println("A["+num+"]construct!");
    }
}
class B {
    A a1 = new A(10);

    B() {
        System.out.println("B construct");
    }

    A a2 = new A(20);
    //由于static声明的关键字是属于类的，会在最开始初始化，而且只会初始化一次
    static A a3 = new A(30);
}
public class TestSeq {
    public static void main(String[] args) {
        B b1 = new B();
        System.out.println("***********************************************************");
        B b2 = new B();
    }
}
